package cn.iocoder.yudao.module.exam.framework.datapermission.config;

import cn.iocoder.yudao.framework.datapermission.core.rule.dept.DeptDataPermissionRuleCustomizer;
import cn.iocoder.yudao.module.exam.dal.dataobject.examType.ExamTypeDO;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Exam 模块的数据权限 Configuration
 *
 * @author 芋道源码
 */
@Configuration(proxyBeanMethods = false)
public class ExamDataPermissionConfiguration {
    @Bean
    public DeptDataPermissionRuleCustomizer examDeptDataPermissionRuleCustomizer() {
        return rule -> {
            // dept 基于部门的数据权限
            rule.addDeptColumn(ExamTypeDO.class);

            // user 基于用户的数据权限
            rule.addUserColumn(ExamTypeDO.class);

        };
    }
}
